{extend name="layout/layout"}
{block name="content"}
<main class="active">
    <div class="head_a1">
        <div class="layui-main">
            <div class="b1">
                <div class="t1">步驟二：票券設定( 進階設定 )</div>
                <a href="/" class="back_btn"><img src="__ROOT__/public/activity/images/out.png">返回首页</a>
            </div>
        </div>
    </div>
    <div class="main_a">
        <div class="layui-main">
            <div class="active_w active3 ">
                <p class="text-align-center ft18 mb60 ft-bold">進階設定</p>
             
                <from class="layui-form" action="" onsubmit="return false;">
                    <div class="content">
                        <div class=" layui-form-item">
                            <div class="d-flex jc-s al-c">
                                <div class="label ">本活動是否公開顯示人數及票券數量？<p class=" tip1">活動剛開賣時建議不顯示</p>
                                </div>

                                <div class="">
                                    <input type="checkbox" name="show_tickets"  {if isset($advanced.show_tickets) && $advanced.show_tickets == 1} checked {/if}  value="1" title="显示">
                                </div>
                            </div>
                        </div>
                        <div class=" layui-form-item">
                            <div class="d-flex jc-s al-c">

                                <div class="label">本活動是否為『非公開』活動？<p class=" tip1">活動若設為非公開活動時，將不能在平台上被找到</p>
                                </div>

                                <div class="">

                                    <input type="checkbox" name="un_public" {if isset($advanced.un_public) && $advanced.un_public == 1} checked {/if} value="1" title="显示">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="mt100 d-flex jc-s al-c">
                        <a href="/activity/create/diyform.html" class="last-btn">
                            <img src="__ROOT__/public/activity/images/out1.png">返回上一步
                        </a>
                        <a href="javascript:;">
                            <button class="layui-btn layui-bg-orange next-btn" lay-submit lay-filter="advanced_form">下一步</button>
                        </a>
                    </div>
                </from>
            </div>

        </div>
    </div>
</main>

<script>
    layui.use(function () {
        var layer = layui.layer;
        var element = layui.element;
        var $ = layui.$;
        var form = layui.form;
        form.on('submit(advanced_form)', function(data){

            $.quickPost('{:url("/activity/create/advanced")}', data.field).done(res => {
 
                location.href = '/activity/create/pay.html';
            });
            return false;
        });
    })
    function goNext() {
        var data = layui.form.val('pay')
        console.log(data)
        $.quickPost('{:url("/activity/create/pay")}', data).done(res => {
            location.href = '/activity/create/refund.html';
        });
    }

</script>

{/block}